const env = process.env.NODE_ENV // 环境参数
// 配置
let MYSQL_CONF
let REDIS_CONF
if (env === 'development') {
  MYSQL_CONF = {
    host: '127.0.0.1',
    user: 'root',
    password: '813729',
    port: '3306',
    database: 'myblog1',
  }
  REDIS_CONF = {
    host: '127.0.0.1',
    port: '6379',
  }
}
if (env == 'production') {
  // 替换成线上服务器的地址和配置
  MYSQL_CONF = {
    host: 'localhost',
    user: 'root',
    password: 'Mysql 2018',
    port: '3306',
    database: 'myblog',
  }
  REDIS_CONF = {
    host: '127.0.0.1',
    port: '6379',
  }
}
module.exports = {
  MYSQL_CONF,
  REDIS_CONF,
}
